<template>
  <h2>{{msg}}-{{$route.params.newsId}}:{{$route.params.newsTitle}}</h2>
</template>

<script>
export default {
  name: 'goParams',
  data () {
    return {
      msg: '测试链接传参'
    }
  },
  beforeRouteEnter:(to,from,next)=>{
    console.log("准备进入params路由模板");
    next();
  },
  beforeRouteLeave: (to,from,next)=>{
    console.log("准备离开params路由模板");
    next();
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->